package com.leoman.plz_p.views.group;

import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;

import com.leoman.plz_p.R;
import com.leoman.plz_p.views.mine.ExamRecordActivity;
import com.leoman.plz_p.views.mine.MistakeActivity;
import com.leoman.plz_p.views.mine.StudyRecordActivity;
import com.leoman.plz_p.weidget.NavBar;

import butterknife.Bind;
import butterknife.OnClick;
import cn.com.corelib.base.BaseFragment;
import cn.com.corelib.base.BasePresenter;

/**
 * Created by guoh on 2018/8/26.
 */
public class GroupFragment extends BaseFragment{

    @Bind(R.id.nav)
    NavBar nav;
    @Bind(R.id.ll_mistake)
    LinearLayout llMistake;
    @Bind(R.id.ll_study_record)
    LinearLayout llStudyRecord;
    @Bind(R.id.ll_exam_study)
    LinearLayout llExamStudy;

    @Override
    protected int getLayoutId() {
        return R.layout.fr_group;
    }

    @Override
    protected void init(Bundle savedInstanceState) {
        nav.setTitle("学习");
        nav.hideBack();
    }

    @OnClick({R.id.ll_mistake, R.id.ll_study_record, R.id.ll_exam_study})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.ll_mistake:
                startActivity(MistakeActivity.getLaunchIntent(getViewContext()));
                break;
            case R.id.ll_study_record:
                startActivity(StudyRecordActivity.getLaunchIntent(getViewContext()));
                break;
            case R.id.ll_exam_study:
                startActivity(ExamRecordActivity.getLaunchIntent(getViewContext()));
                break;
        }
    }

    @Override
    protected BasePresenter createPresenter() {
        return null;
    }
}
